package com.xs.shop.user.service.controller;

import com.xs.shop.common.Result;
import com.xs.shop.user.service.service.AdminInfoService;
import com.xs.shop.user.model.vo.AdminInfoVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author xs
 * @since 2025-07-15
 */
@Tag(name="管理员信息管理", description = "管理员信息获取接口")
@RestController
@RequestMapping("/adminInfo")
public class AdminInfoController {

    @Resource
    private AdminInfoService adminInfoService;

    @Operation(summary = "获取管理员信息", description = "获取当前登录管理员的基本信息")
    @PostMapping("info")
    public Result<AdminInfoVO> info(){
        AdminInfoVO adminInfoVO= this.adminInfoService.info();
        return Result.success(adminInfoVO);
    }
}
